import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home.vue'
import Main from '@/components/Main.vue'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/home',
            name: 'home',
            component: Home
        },
        {
            path: '/Details',
            name: 'Details',
            component: () => import('@/views/Details.vue')
        },
        {
            path: '/activity',
            component: Main,
            children: [
                {
                    path: '/activity',
                    name: 'activity',
                    component: () => import('@/views/activity.vue'),
                    meta: {
                        keepAlive: true // 需要被缓存
                    }
                },
                {
                    path: '/information',
                    name: 'information',
                    component: () => import('@/views/information.vue'),
                    meta: {
                        keepAlive: true // 需要被缓存
                    }
                },
                {
                    path: '/study',
                    name: 'study',
                    component: () => import('@/views/study.vue'),
                    meta: {
                        keepAlive: true // 需要被缓存
                    }
                },
                {
                    path: '/notice',
                    name: 'notice',
                    component: () => import('@/views/notice.vue'),
                    meta: {
                        keepAlive: true // 需要被缓存
                    }
                },
                // {
                //     path: '/personage',
                //     name: 'personage',
                //     component: () => import('@/views/personage.vue')
                // },

            ]
        }
    ]
})
